home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3583 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c,comp.unix.osf.misc,comp.unix.osf.osf1,comp.unix.ultrix
  4. Subject: Re: File descriptor equivalent of fflush?
  5. Date: 29 Jan 1996 12:58:54 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4ejceeINN5v3@keats.ugrad.cs.ubc.ca>
  8. References: <DLxHsx.7Ko@un.seqeb.gov.au>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <DLxHsx.7Ko@un.seqeb.gov.au>,
  12. Anthony Lee <al012@svtstu.seqeb.gov.au> wrote:
  13. >Dear all,
  14. >
  15. >I am trying to find an equivalent of fflush for file descriptors
  16. >in ULTRIX and OSF.  
  17.  
  18. All you can do is open the file with the O_SYNC flag. If the underlying file
  19. system supports it, the write() calls will exit only when the blocks affected
  20. by write() have been committed to disk.
  21.  
  22. You can also call fsync() on the file descriptor, which will cause all the
  23. unwritten cache blocks belonging to that file to be queued for writing, though
  24. I'm not sure whether fsync() will wait for the writing to take place. 
  25.  
  26. >-- 
  27. >Anthony Lee        These are my opinions and not SEQEB.
  28. >SEQEB                                            
  29. >150 Charlotte Street                   ..--  __o 
  30. >Brisbane                          ....--   _ \<,_               
  31. >Qld 4000                         ____     (_)/ (_)                       
  32. >Australia
  33. >voice:+61 7 3407 4541            Death to the Daleks!!!!
  34. >fax:  +61 7 3407 4607
  35. >email: AL012@svtstu.seqeb.gov.au
  36. >
  37.  
  38.  
  39. -- 
  40.  
  41.